2020-2021 Sunseeker Telemetry and Lighting System
cs_ex1_DCO1MHzSWTrim.c File Reference
#include "driverlib.h"
#include "Board.h"

Go to the source code of this file.

Macros

#define CS_MCLK_DESIRED_FREQUENCY_IN_KHZ   1000
 
#define CS_MCLK_FLLREF_RATIO   30
 

Functions

void main (void)
 
void NMI_ISR (void)
 

Variables

uint32_t clockValue = 0
 
uint16_t status
 

Macro Definition Documentation

◆ CS_MCLK_DESIRED_FREQUENCY_IN_KHZ

#define CS_MCLK_DESIRED_FREQUENCY_IN_KHZ   1000

Software Trim on 1MHz DCO

Performs proper software trim both from uncalculated trim values and pre-loaded trim values, and then toggles LED2 ACLK, SMCLK, and MCLK are brought out to external pins on the board.

ACLK = REFO = ~32kHz, MCLK = SMCLK = 1MHz

    MSP430FR2xx_4xx Board
      -----------------
  /|\|                 |
   | |                 |-->ACLK
   --|RST              |-->MCLK
     |                 |-->SMCLK
     |                 |
     |                 |-->LED2

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

  • CS module
  • GPIO Port peripheral

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

  • None.

Definition at line 69 of file cs_ex1_DCO1MHzSWTrim.c.

◆ CS_MCLK_FLLREF_RATIO

#define CS_MCLK_FLLREF_RATIO   30

Definition at line 76 of file cs_ex1_DCO1MHzSWTrim.c.

Function Documentation

◆ main()

void main ( void  )

◆ NMI_ISR()

void NMI_ISR ( void  )

Definition at line 205 of file cs_ex1_DCO1MHzSWTrim.c.

References status.

Variable Documentation

◆ clockValue

uint32_t clockValue = 0

Definition at line 83 of file cs_ex1_DCO1MHzSWTrim.c.

Referenced by main().

◆ status

uint16_t status

Definition at line 90 of file cs_ex1_DCO1MHzSWTrim.c.

Referenced by NMI_ISR().